package cn.com.huzo.model.entities.master;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 贸易方式实体类
 *
 * @author 吴旭
 */
public class TradeModeEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = -3312920690789162645L;
    private Long ModeId;
    private String TradeModeNo;
    private String TradeModeName;

    public Long getModeId() {
        return ModeId;
    }

    public String getTradeModeNo() {
        return TradeModeNo;
    }

    public String getTradeModeName() {
        return TradeModeName;
    }

    public void setModeId(Long ModeId) {
        this.ModeId = ModeId;
    }

    public void setTradeModeNo(String TradeModeNo) {
        this.TradeModeNo = TradeModeNo;
    }

    public void setTradeModeName(String TradeModeName) {
        this.TradeModeName = TradeModeName;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof TradeModeEntity)) {
            return false;
        }

        final TradeModeEntity that = (TradeModeEntity) o;

        return new EqualsBuilder()
                .append(this.getModeId(), that.getModeId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getModeId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
